<html>
<head>
		<load href="__JS__/menu.js" />
		<load href="__JS__/leftmenubar.js" />
		<load href="__CSS__/header.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>下载</title>
<load href= "__JS__/jshelper.js" /> 
<script type="text/JavaScript">
				function fileedit(id){
					window.location.href="__URL__/fileedit/id/"+id;
				}
				function filesearch(id){
					window.location.href="__URL__/filedetail/id/"+id;
				}
				function filedelete(id,courseid){
					if (confirm("你确定要删除吗")==true)
						postwith('__URL__/filedelete',{id:id,courseid:courseid});
				}
					window.onload=show;
	</script>
	<load href="__JS__/jQuery/jquery.js" />
	<load href="__JS__/jQuery/jquery.form.js" />
	<script type="text/JavaScript">
       $(function(){
           $('#form1').ajaxForm({
               //beforeSubmit:  function(){alert("before");},  // pre-submit callback
               success:       complete,  // post-submit callback
               error:function(){alert("error");},
               dataType: 'json'
           });
           
           function complete(data){
               if (data.status==1)
               {
               	window.location=window.location.href;
               }else{
                   $('#result').html(data.info).show();
               }
           }
       });
       </script>
</head>
<body>
	 <layout name="Auth:header" />
	 <div class="nowposition" >
		 当前位置：
		<a href='__APP__/index/index' class="nowpositionhref">主页</a>>
		<a href='__URL__/index' class="nowpositionhref">课程展示</a>>
		<a href='__URL__/course/id/{$id}' class="nowpositionhref">{$coursename}</a>>
		<a href="" class="nowpositionhref" >资料下载</a>
	</div>
	<layout name="Auth:Courseleftmenu" />
	<div class="file_Show" >
					<table width="100%" border="0" align="center" cellpadding="0px" cellspacing="0px">
						<thead  style=" font-weight:bold; font-size:12px; background-color:f0f0f0;">
							<tr id="table_file_show_title" height="35px">
								<td style="width:15%">作者</td>
								<td style="width:45%">标题</td>
								<td style="width:20%">发表时间</td>
								<td style="width:7%">下载量</td>
								<if condition='$a eq 0'>
								<else/>
								<td style="width:50px">操作</td>
								</if>
							</tr>
						</thead>
						<load href"__PUBLIC__/js/list_show.js">
						<tbody id="tab">
							<volist name='list' id='vo' >
								<tr id="table_file_show" height="40px">
									<td style="display:none;">{$vo.id}</td>	<!--ID-->
									<td style="width:15%">{$vo.nname}</td><!--作者-->
									<td style="width:45%"><a href="__ROOT__{$vo.path}{$vo.savename}" target="_blank">{$vo.name}</a></td><!--标题-->
									<td style="width:20%;">{$vo.time}</td><!--发表时间-->
									<td style="width:7%;">{$vo.downloadno}</td><!--下载量-->
									<if condition='$a eq 0'>
										
									<else/>
									<td style="width:180px;">
										<a href="#" name='edit_file'  onClick='fileedit({$vo.id})' style=" font-size:12px;">编辑</a>
										<a href="#"  name='delete_file' onClick='filedelete({$vo.id},{$vo.courseid})' style=" font-size:12px;">删除</a>
										<!--<input name="delete_file" type="reset" onClick="filedelete({$vo.id},{$vo.courseid})" value="删除">-->
										
									</td>
									</if>
									</td>
								</tr>
							</volist>
						
						</tbody>		
					</table><div class="green-black" align="right" style="position:relative; top:35px;">{$page}</div>
				</div>
</body>
</html>